//alexis 2010/07/24 (et avant)
//draw trajectories without analog read

//contain trajectories for simple drawing such as letter numbers
//or icons made on a 16x16 grid using the SLP_shortTrajectoryTool

//functions prototypes:
//  int set_circularSaccadeFromChar(char charTrajectory);
//  void drawTrajectoryFromString(char *trajectory, int nbChar, boolean centered, int RedLaserPower, boolean GreenLaserPower, float offsetAz, float offsetEl, float radius, float rotation);
//  void drawTrajectoryFromChar(char trajectory, int RedLaserPower, boolean GreenLaserPower, float centAz, float centEl, float radius);
//  void drawTrajectoryFromChar(char trajectory, int RedLaserPower, boolean GreenLaserPower, float centAz, float centEl, float radius, float rotation);


#define DELAY_STARTSTRING 200 //delay used to leave time to mirrors to move to the begining of the string
#define DELAY_BETWEENLETTERS 500 //delay between two letters in microseconds
#define DELAY_STARTLASER 600
#define DELAY_INTERSPOT 30 //delay between each update of position when drawing a letter
#define DELAY_ENDINGLETTER 150

//void LivingSpot::drawTrajectoryFromString(char *trajectory, int nbChar, boolean centered, int RedLaserPower, boolean GreenLaserPower, float offsetAz, float offsetEl, float radius, float rotation){
void LivingSpot::drawTrajectoryFromString(char *trajectory, boolean centered, float pRedLaserPower, boolean pGreenLaserPower, float offsetAz, float offsetEl, float radius, float rotation){
 int nbChar=0;
 while (trajectory[nbChar]!=0) nbChar++;
  //the offset is applied to the middle of the string
  if(centered){
    //if rotation is needed, call drawTrajectoryFromCharWithRotation
    if(rotation!=0){
      float vectorX, vectorY, beginX, beginY, beginNorm;
      vectorX = cos(rotation) * radius*2;
      vectorY = sin(rotation) * radius*2;
      beginNorm = -1.0*nbChar/2;
      beginX = offsetAz + beginNorm*vectorX;
      beginY = offsetEl + beginNorm*vectorY;
      IO.setMirrorsXY_AD(beginX, beginY);
      for(int i=0; i<nbChar; i++){
        drawTrajectoryFromChar(trajectory[i], pRedLaserPower, pGreenLaserPower, beginX + i*vectorX, beginY + i*vectorY, radius, rotation);
      }
    }
    //rotation not needed, call drawTrajectoryFromChar
    else{
      float beginX, beginNorm;
      beginNorm = -1.0*nbChar/2;
      beginX = offsetAz + beginNorm*radius*2;
      IO.setMirrorsXY_AD(beginX, offsetEl);
      for(int i=0; i<nbChar; i++){
        drawTrajectoryFromChar(trajectory[i], pRedLaserPower, pGreenLaserPower, beginX + i*radius*2, offsetEl, radius);
      }
    }
  }
  
  //the offset is applied to the begining of the string
  else{
    //if rotation is needed, call drawTrajectoryFromCharWithRotation
    if(rotation!=0){
      float vectorX, vectorY;
      vectorX = cos(rotation) * radius*2;
      vectorY = sin(rotation) * radius*2;
      IO.setMirrorsXY_AD(offsetAz, offsetEl);
      for(int i=0; i<nbChar; i++){
        drawTrajectoryFromChar(trajectory[i], pRedLaserPower,  pGreenLaserPower, offsetAz + i*vectorX, offsetEl + i*vectorY, radius, rotation);
      }
    }
    //rotation not needed, call drawTrajectoryFromChar
    else{
      IO.setMirrorsXY_AD(offsetAz, offsetEl);
      for(int i=0; i<nbChar; i++){
        drawTrajectoryFromChar(trajectory[i], pRedLaserPower,  pGreenLaserPower, offsetAz + i*radius*2, offsetEl, radius);
      }
    }
  }
}

//similar to scanTrajectory without analog read nor rotation nor extra point
void LivingSpot::drawTrajectoryFromChar(char trajectory, float pRedLaserPower, boolean pGreenLaserPower, float centAz, float centEl, float radius){
  if(set_circularSaccadeFromChar(trajectory)){
  
    float  x = radius*(_circularSaccade[0]-127)/127.0;
    float  y = radius*(_circularSaccade[1]-127)/127.0;
    IO.setMirrorsXY_AD(int(x+centAz),int(y+centEl));
    delayMicroseconds(DELAY_BETWEENLETTERS);
    IO.setRedPower_mW(pRedLaserPower); IO.setGreenPower(pGreenLaserPower);
    delayMicroseconds(DELAY_STARTLASER);
    
    for(int i=0; i<_numSamplesCircularSaccade; i++){
      float  x = radius*(_circularSaccade[2*i]-127)/127.0;
      float  y = radius*(_circularSaccade[2*i+1]-127)/127.0;
      IO.setMirrorsXY_AD(int(x+centAz),int(y+centEl));
      delayMicroseconds(DELAY_INTERSPOT); 
    }
    delayMicroseconds(DELAY_ENDINGLETTER);
    IO.setRedPower_mW(0); IO.setGreenPower(LOW);
  }
}


//similar to scanTrajectory without analog read nor extra point
void LivingSpot::drawTrajectoryFromChar(char trajectory, float pRedLaserPower, boolean pGreenLaserPower, float centAz, float centEl, float radius, float rotation){
  if(set_circularSaccadeFromChar(trajectory)){
  
    float  x = radius*(_circularSaccade[0]-127)/127.0;
    float  y = radius*(_circularSaccade[1]-127)/127.0;
    IO.setMirrorsXY_AD(int(cos(rotation)*x-sin(rotation)*y+centAz),int(sin(rotation)*x+cos(rotation)*y+centEl));
    delayMicroseconds(DELAY_BETWEENLETTERS);
    IO.setRedPower_mW(pRedLaserPower); IO.setGreenPower(pGreenLaserPower);
    delayMicroseconds(DELAY_STARTLASER);
    
    for(int i=0; i<_numSamplesCircularSaccade; i++){
       x = radius*(_circularSaccade[2 * i]-127)/127.0;
       y = radius*(_circularSaccade[2 * i + 1]-127)/127.0;
       // Position the mirrors: 
       IO.setMirrorsXY_AD(int(cos(rotation)*x-sin(rotation)*y+centAz),int(sin(rotation)*x+cos(rotation)*y+centEl));
       delayMicroseconds(DELAY_INTERSPOT); 
    }
    delayMicroseconds(DELAY_ENDINGLETTER);
    IO.setRedPower_mW(0); IO.setGreenPower(LOW);
  }
}    
    
int LivingSpot::set_circularSaccadeFromChar(char charTrajectory){
  int returnedValue = 1;
  switch(charTrajectory){
    default: 
        returnedValue = 0;
        break;
    //trajectory 'A'
    //nb position: '('
    //ADCJEPGPIJCJIJKD
    case 'A':
    	_numSamplesCircularSaccade = 8;
    	_circularSaccade[0] = 0;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 9;
    	_circularSaccade[4] = 4;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 6;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 8;
    	_circularSaccade[9] = 9;
    	_circularSaccade[10] = 2;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 8;
    	_circularSaccade[13] = 9;
    	_circularSaccade[14] = 10;
    	_circularSaccade[15] = 3;
    	break;
    
    //trajectory 'B'
    //nb position: '0'
    //BDBHBLBPGPIOJMIKGJBJGJIIJGIEGDBD
    case 'B':
    	_numSamplesCircularSaccade = 16;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 6;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 8;
    	_circularSaccade[11] = 14;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 12;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 10;
    	_circularSaccade[16] = 6;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 1;
    	_circularSaccade[19] = 9;
    	_circularSaccade[20] = 6;
    	_circularSaccade[21] = 9;
    	_circularSaccade[22] = 8;
    	_circularSaccade[23] = 8;
    	_circularSaccade[24] = 9;
    	_circularSaccade[25] = 6;
    	_circularSaccade[26] = 8;
    	_circularSaccade[27] = 4;
    	_circularSaccade[28] = 6;
    	_circularSaccade[29] = 3;
    	_circularSaccade[30] = 1;
    	_circularSaccade[31] = 3;
    	break;
    
    //trajectory 'C'
    //nb position: '.'
    //JMIOGPEPCOBNALAHBFCEEDGDIEJG
    case 'C':
    	_numSamplesCircularSaccade = 14;
    	_circularSaccade[0] = 9;
    	_circularSaccade[1] = 12;
    	_circularSaccade[2] = 8;
    	_circularSaccade[3] = 14;
    	_circularSaccade[4] = 6;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 4;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 2;
    	_circularSaccade[9] = 14;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 13;
    	_circularSaccade[12] = 0;
    	_circularSaccade[13] = 11;
    	_circularSaccade[14] = 0;
    	_circularSaccade[15] = 7;
    	_circularSaccade[16] = 1;
    	_circularSaccade[17] = 5;
    	_circularSaccade[18] = 2;
    	_circularSaccade[19] = 4;
    	_circularSaccade[20] = 4;
    	_circularSaccade[21] = 3;
    	_circularSaccade[22] = 6;
    	_circularSaccade[23] = 3;
    	_circularSaccade[24] = 8;
    	_circularSaccade[25] = 4;
    	_circularSaccade[26] = 9;
    	_circularSaccade[27] = 6;
    	break;
    
    //trajectory 'D'
    //nb position: '-'
    //BDBHBLBPFPIOJNKKKIJFIEFDBD
    case 'D':
    	_numSamplesCircularSaccade = 13;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 8;
    	_circularSaccade[11] = 14;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 13;
    	_circularSaccade[14] = 10;
    	_circularSaccade[15] = 10;
    	_circularSaccade[16] = 10;
    	_circularSaccade[17] = 8;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 5;
    	_circularSaccade[20] = 8;
    	_circularSaccade[21] = 4;
    	_circularSaccade[22] = 5;
    	_circularSaccade[23] = 3;
    	_circularSaccade[24] = 1;
    	_circularSaccade[25] = 3;
    	break;
    
    //trajectory 'E'
    //nb position: '+'
    //JPFPBPBMBJFJBJBGBDFDJD
    case 'E':
    	_numSamplesCircularSaccade = 11;
    	_circularSaccade[0] = 9;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 5;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 12;
    	_circularSaccade[8] = 1;
    	_circularSaccade[9] = 9;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 1;
    	_circularSaccade[13] = 9;
    	_circularSaccade[14] = 1;
    	_circularSaccade[15] = 6;
    	_circularSaccade[16] = 1;
    	_circularSaccade[17] = 3;
    	_circularSaccade[18] = 5;
    	_circularSaccade[19] = 3;
    	_circularSaccade[20] = 9;
    	_circularSaccade[21] = 3;
    	break;
    
    //trajectory 'F'
    //nb position: ')'
    //BDBGBJFJBJBMBPFPJP
    case 'F':
    	_numSamplesCircularSaccade = 9;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 6;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 9;
    	_circularSaccade[6] = 5;
    	_circularSaccade[7] = 9;
    	_circularSaccade[8] = 1;
    	_circularSaccade[9] = 9;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 12;
    	_circularSaccade[12] = 1;
    	_circularSaccade[13] = 15;
    	_circularSaccade[14] = 5;
    	_circularSaccade[15] = 15;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 15;
    	break;
    
    //trajectory 'G'
    //nb position: '3'
    //KLJNIOGPEPCOBNALAHBFCEEDGDIEJFKHKIHIFI
    case 'G':
    	_numSamplesCircularSaccade = 19;
    	_circularSaccade[0] = 10;
    	_circularSaccade[1] = 11;
    	_circularSaccade[2] = 9;
    	_circularSaccade[3] = 13;
    	_circularSaccade[4] = 8;
    	_circularSaccade[5] = 14;
    	_circularSaccade[6] = 6;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 4;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 2;
    	_circularSaccade[11] = 14;
    	_circularSaccade[12] = 1;
    	_circularSaccade[13] = 13;
    	_circularSaccade[14] = 0;
    	_circularSaccade[15] = 11;
    	_circularSaccade[16] = 0;
    	_circularSaccade[17] = 7;
    	_circularSaccade[18] = 1;
    	_circularSaccade[19] = 5;
    	_circularSaccade[20] = 2;
    	_circularSaccade[21] = 4;
    	_circularSaccade[22] = 4;
    	_circularSaccade[23] = 3;
    	_circularSaccade[24] = 6;
    	_circularSaccade[25] = 3;
    	_circularSaccade[26] = 8;
    	_circularSaccade[27] = 4;
    	_circularSaccade[28] = 9;
    	_circularSaccade[29] = 5;
    	_circularSaccade[30] = 10;
    	_circularSaccade[31] = 7;
    	_circularSaccade[32] = 10;
    	_circularSaccade[33] = 8;
    	_circularSaccade[34] = 7;
    	_circularSaccade[35] = 8;
    	_circularSaccade[36] = 5;
    	_circularSaccade[37] = 8;
    	break;
    
    //trajectory 'H'
    //nb position: '.'
    //BDBGBJBMBPBJEJGJJJJMJPJJJGJD
    case 'H':
    	_numSamplesCircularSaccade = 14;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 6;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 9;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 12;
    	_circularSaccade[8] = 1;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 4;
    	_circularSaccade[13] = 9;
    	_circularSaccade[14] = 6;
    	_circularSaccade[15] = 9;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 12;
    	_circularSaccade[20] = 9;
    	_circularSaccade[21] = 15;
    	_circularSaccade[22] = 9;
    	_circularSaccade[23] = 9;
    	_circularSaccade[24] = 9;
    	_circularSaccade[25] = 6;
    	_circularSaccade[26] = 9;
    	_circularSaccade[27] = 3;
    	break;
    
    //trajectory 'I'
    //nb position: '+'
    //DPFPHPFPFMFJFGFDDDFDHD
    case 'I':
    	_numSamplesCircularSaccade = 11;
    	_circularSaccade[0] = 3;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 5;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 7;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 5;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 12;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 5;
    	_circularSaccade[13] = 6;
    	_circularSaccade[14] = 5;
    	_circularSaccade[15] = 3;
    	_circularSaccade[16] = 3;
    	_circularSaccade[17] = 3;
    	_circularSaccade[18] = 5;
    	_circularSaccade[19] = 3;
    	_circularSaccade[20] = 7;
    	_circularSaccade[21] = 3;
    	break;
    
    //trajectory 'J'
    //nb position: ','
    //EPHPKPHPHMHJHGGEFDDDCEBG
    case 'J':
    	_numSamplesCircularSaccade = 12;
    	_circularSaccade[0] = 4;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 7;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 10;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 7;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 7;
    	_circularSaccade[9] = 12;
    	_circularSaccade[10] = 7;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 7;
    	_circularSaccade[13] = 6;
    	_circularSaccade[14] = 6;
    	_circularSaccade[15] = 4;
    	_circularSaccade[16] = 5;
    	_circularSaccade[17] = 3;
    	_circularSaccade[18] = 3;
    	_circularSaccade[19] = 3;
    	_circularSaccade[20] = 2;
    	_circularSaccade[21] = 4;
    	_circularSaccade[22] = 1;
    	_circularSaccade[23] = 6;
    	break;
    
    //trajectory 'K'
    //nb position: '+'
    //BDBHBLBPBJFJHMJPFJHGJD
    case 'K':
    	_numSamplesCircularSaccade = 11;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 1;
    	_circularSaccade[9] = 9;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 7;
    	_circularSaccade[13] = 12;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 15;
    	_circularSaccade[16] = 5;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 7;
    	_circularSaccade[19] = 6;
    	_circularSaccade[20] = 9;
    	_circularSaccade[21] = 3;
    	break;
    
    //trajectory 'L'
    //nb position: '&'
    //BPBLBHBDFDJD
    case 'L':
    	_numSamplesCircularSaccade = 6;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 11;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 7;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 3;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 3;
    	_circularSaccade[10] = 9;
    	_circularSaccade[11] = 3;
    	break;
    
    //trajectory 'M'
    //nb position: '+'
    //ADAHALAPCMFIIMKPKLKHKD
    case 'M':
    	_numSamplesCircularSaccade = 11;
    	_circularSaccade[0] = 0;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 0;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 0;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 0;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 2;
    	_circularSaccade[9] = 12;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 8;
    	_circularSaccade[12] = 8;
    	_circularSaccade[13] = 12;
    	_circularSaccade[14] = 10;
    	_circularSaccade[15] = 15;
    	_circularSaccade[16] = 10;
    	_circularSaccade[17] = 11;
    	_circularSaccade[18] = 10;
    	_circularSaccade[19] = 7;
    	_circularSaccade[20] = 10;
    	_circularSaccade[21] = 3;
    	break;
    
    //trajectory 'N'
    //nb position: '+'
    //BDBHBLBPDMFJHGJDJHJLJP
    case 'N':
    	_numSamplesCircularSaccade = 11;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 3;
    	_circularSaccade[9] = 12;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 7;
    	_circularSaccade[13] = 6;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 3;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 7;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 11;
    	_circularSaccade[20] = 9;
    	_circularSaccade[21] = 15;
    	break;
    
    //trajectory 'O'
    //nb position: '3'
    //EPCOBNALAJAHBFCEEDGDIEJFKHKJKLJNIOGPEP
    case 'O':
    	_numSamplesCircularSaccade = 19;
    	_circularSaccade[0] = 4;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 14;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 13;
    	_circularSaccade[6] = 0;
    	_circularSaccade[7] = 11;
    	_circularSaccade[8] = 0;
    	_circularSaccade[9] = 9;
    	_circularSaccade[10] = 0;
    	_circularSaccade[11] = 7;
    	_circularSaccade[12] = 1;
    	_circularSaccade[13] = 5;
    	_circularSaccade[14] = 2;
    	_circularSaccade[15] = 4;
    	_circularSaccade[16] = 4;
    	_circularSaccade[17] = 3;
    	_circularSaccade[18] = 6;
    	_circularSaccade[19] = 3;
    	_circularSaccade[20] = 8;
    	_circularSaccade[21] = 4;
    	_circularSaccade[22] = 9;
    	_circularSaccade[23] = 5;
    	_circularSaccade[24] = 10;
    	_circularSaccade[25] = 7;
    	_circularSaccade[26] = 10;
    	_circularSaccade[27] = 9;
    	_circularSaccade[28] = 10;
    	_circularSaccade[29] = 11;
    	_circularSaccade[30] = 9;
    	_circularSaccade[31] = 13;
    	_circularSaccade[32] = 8;
    	_circularSaccade[33] = 14;
    	_circularSaccade[34] = 6;
    	_circularSaccade[35] = 15;
    	_circularSaccade[36] = 4;
    	_circularSaccade[37] = 15;
    	break;
    
    //trajectory 'P'
    //nb position: '*'
    //CDCHCLCPFPIOJMIKFJCJ
    case 'P':
    	_numSamplesCircularSaccade = 10;
    	_circularSaccade[0] = 2;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 2;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 2;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 8;
    	_circularSaccade[11] = 14;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 12;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 10;
    	_circularSaccade[16] = 5;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 2;
    	_circularSaccade[19] = 9;
    	break;
    
    //trajectory 'Q'
    //nb position: '5'
    //KDIEGDEDCEBFAHAJALBNCOEPGPIOJNKLKJKHJFIEGF
    case 'Q':
    	_numSamplesCircularSaccade = 21;
    	_circularSaccade[0] = 10;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 8;
    	_circularSaccade[3] = 4;
    	_circularSaccade[4] = 6;
    	_circularSaccade[5] = 3;
    	_circularSaccade[6] = 4;
    	_circularSaccade[7] = 3;
    	_circularSaccade[8] = 2;
    	_circularSaccade[9] = 4;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 5;
    	_circularSaccade[12] = 0;
    	_circularSaccade[13] = 7;
    	_circularSaccade[14] = 0;
    	_circularSaccade[15] = 9;
    	_circularSaccade[16] = 0;
    	_circularSaccade[17] = 11;
    	_circularSaccade[18] = 1;
    	_circularSaccade[19] = 13;
    	_circularSaccade[20] = 2;
    	_circularSaccade[21] = 14;
    	_circularSaccade[22] = 4;
    	_circularSaccade[23] = 15;
    	_circularSaccade[24] = 6;
    	_circularSaccade[25] = 15;
    	_circularSaccade[26] = 8;
    	_circularSaccade[27] = 14;
    	_circularSaccade[28] = 9;
    	_circularSaccade[29] = 13;
    	_circularSaccade[30] = 10;
    	_circularSaccade[31] = 11;
    	_circularSaccade[32] = 10;
    	_circularSaccade[33] = 9;
    	_circularSaccade[34] = 10;
    	_circularSaccade[35] = 7;
    	_circularSaccade[36] = 9;
    	_circularSaccade[37] = 5;
    	_circularSaccade[38] = 8;
    	_circularSaccade[39] = 4;
    	_circularSaccade[40] = 6;
    	_circularSaccade[41] = 5;
    	break;
    
    //trajectory 'R'
    //nb position: '0'
    //BDBHBLBPFPIOJMIKFJDJBJEJGIHHIFJD
    case 'R':
    	_numSamplesCircularSaccade = 16;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 8;
    	_circularSaccade[11] = 14;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 12;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 10;
    	_circularSaccade[16] = 5;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 3;
    	_circularSaccade[19] = 9;
    	_circularSaccade[20] = 1;
    	_circularSaccade[21] = 9;
    	_circularSaccade[22] = 4;
    	_circularSaccade[23] = 9;
    	_circularSaccade[24] = 6;
    	_circularSaccade[25] = 8;
    	_circularSaccade[26] = 7;
    	_circularSaccade[27] = 7;
    	_circularSaccade[28] = 8;
    	_circularSaccade[29] = 5;
    	_circularSaccade[30] = 9;
    	_circularSaccade[31] = 3;
    	break;
    
    //trajectory 'S'
    //nb position: '1'
    //JNIOGPEPCOBNBLCKEJGJIIJGIEGDEDCEBF
    case 'S':
    	_numSamplesCircularSaccade = 17;
    	_circularSaccade[0] = 9;
    	_circularSaccade[1] = 13;
    	_circularSaccade[2] = 8;
    	_circularSaccade[3] = 14;
    	_circularSaccade[4] = 6;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 4;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 2;
    	_circularSaccade[9] = 14;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 13;
    	_circularSaccade[12] = 1;
    	_circularSaccade[13] = 11;
    	_circularSaccade[14] = 2;
    	_circularSaccade[15] = 10;
    	_circularSaccade[16] = 4;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 6;
    	_circularSaccade[19] = 9;
    	_circularSaccade[20] = 8;
    	_circularSaccade[21] = 8;
    	_circularSaccade[22] = 9;
    	_circularSaccade[23] = 6;
    	_circularSaccade[24] = 8;
    	_circularSaccade[25] = 4;
    	_circularSaccade[26] = 6;
    	_circularSaccade[27] = 3;
    	_circularSaccade[28] = 4;
    	_circularSaccade[29] = 3;
    	_circularSaccade[30] = 2;
    	_circularSaccade[31] = 4;
    	_circularSaccade[32] = 1;
    	_circularSaccade[33] = 5;
    	break;
    
    //trajectory 'T'
    //nb position: '('
    //BPFPFLFHFDFJFPJP
    case 'T':
    	_numSamplesCircularSaccade = 8;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 5;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 5;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 5;
    	_circularSaccade[7] = 7;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 3;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 9;
    	_circularSaccade[12] = 5;
    	_circularSaccade[13] = 15;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 15;
    	break;
    
    //trajectory 'U'
    //nb position: '*'
    //BPBLBHCEEDGDIEJHJLJP
    case 'U':
    	_numSamplesCircularSaccade = 10;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 11;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 7;
    	_circularSaccade[6] = 2;
    	_circularSaccade[7] = 4;
    	_circularSaccade[8] = 4;
    	_circularSaccade[9] = 3;
    	_circularSaccade[10] = 6;
    	_circularSaccade[11] = 3;
    	_circularSaccade[12] = 8;
    	_circularSaccade[13] = 4;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 7;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 11;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 15;
    	break;
    
    //trajectory 'V'
    //nb position: '''
    //APBNDIFDHIJNKP
    case 'V':
    	_numSamplesCircularSaccade = 7;
    	_circularSaccade[0] = 0;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 13;
    	_circularSaccade[4] = 3;
    	_circularSaccade[5] = 8;
    	_circularSaccade[6] = 5;
    	_circularSaccade[7] = 3;
    	_circularSaccade[8] = 7;
    	_circularSaccade[9] = 8;
    	_circularSaccade[10] = 9;
    	_circularSaccade[11] = 13;
    	_circularSaccade[12] = 10;
    	_circularSaccade[13] = 15;
    	break;
    
    //trajectory 'W'
    //nb position: '+'
    //APBLCHDDEHFKGHHDIHJLKP
    case 'W':
    	_numSamplesCircularSaccade = 11;
    	_circularSaccade[0] = 0;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 11;
    	_circularSaccade[4] = 2;
    	_circularSaccade[5] = 7;
    	_circularSaccade[6] = 3;
    	_circularSaccade[7] = 3;
    	_circularSaccade[8] = 4;
    	_circularSaccade[9] = 7;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 10;
    	_circularSaccade[12] = 6;
    	_circularSaccade[13] = 7;
    	_circularSaccade[14] = 7;
    	_circularSaccade[15] = 3;
    	_circularSaccade[16] = 8;
    	_circularSaccade[17] = 7;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 11;
    	_circularSaccade[20] = 10;
    	_circularSaccade[21] = 15;
    	break;
    
    //trajectory 'X'
    //nb position: '-'
    //BPDMFJDGBDDGFJHMJPHMFJHGJD
    case 'X':
    	_numSamplesCircularSaccade = 13;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 3;
    	_circularSaccade[3] = 12;
    	_circularSaccade[4] = 5;
    	_circularSaccade[5] = 9;
    	_circularSaccade[6] = 3;
    	_circularSaccade[7] = 6;
    	_circularSaccade[8] = 1;
    	_circularSaccade[9] = 3;
    	_circularSaccade[10] = 3;
    	_circularSaccade[11] = 6;
    	_circularSaccade[12] = 5;
    	_circularSaccade[13] = 9;
    	_circularSaccade[14] = 7;
    	_circularSaccade[15] = 12;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 15;
    	_circularSaccade[18] = 7;
    	_circularSaccade[19] = 12;
    	_circularSaccade[20] = 5;
    	_circularSaccade[21] = 9;
    	_circularSaccade[22] = 7;
    	_circularSaccade[23] = 6;
    	_circularSaccade[24] = 9;
    	_circularSaccade[25] = 3;
    	break;
    
    //trajectory 'Y'
    //nb position: ')'
    //BPDMFJFGFDFGFJHMJP
    case 'Y':
    	_numSamplesCircularSaccade = 9;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 3;
    	_circularSaccade[3] = 12;
    	_circularSaccade[4] = 5;
    	_circularSaccade[5] = 9;
    	_circularSaccade[6] = 5;
    	_circularSaccade[7] = 6;
    	_circularSaccade[8] = 5;
    	_circularSaccade[9] = 3;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 6;
    	_circularSaccade[12] = 5;
    	_circularSaccade[13] = 9;
    	_circularSaccade[14] = 7;
    	_circularSaccade[15] = 12;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 15;
    	break;
    
    //trajectory 'Z'
    //nb position: '''
    //APFPKPFJADFDKD
    case 'Z':
    	_numSamplesCircularSaccade = 7;
    	_circularSaccade[0] = 0;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 5;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 10;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 5;
    	_circularSaccade[7] = 9;
    	_circularSaccade[8] = 0;
    	_circularSaccade[9] = 3;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 3;
    	_circularSaccade[12] = 10;
    	_circularSaccade[13] = 3;
    	break;
    
    //trajectory '1'
    //nb position: '%'
    //CLGPGLGHGD
    case '1':
    	_numSamplesCircularSaccade = 5;
    	_circularSaccade[0] = 2;
    	_circularSaccade[1] = 11;
    	_circularSaccade[2] = 6;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 6;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 6;
    	_circularSaccade[7] = 7;
    	_circularSaccade[8] = 6;
    	_circularSaccade[9] = 3;
    	break;
    
    //trajectory '2'
    //nb position: '-'
    //BMCOEPGPIOJMJLIJFHDFBDFDJD
    case '2':
    	_numSamplesCircularSaccade = 13;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 12;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 14;
    	_circularSaccade[4] = 4;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 6;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 8;
    	_circularSaccade[9] = 14;
    	_circularSaccade[10] = 9;
    	_circularSaccade[11] = 12;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 11;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 9;
    	_circularSaccade[16] = 5;
    	_circularSaccade[17] = 7;
    	_circularSaccade[18] = 3;
    	_circularSaccade[19] = 5;
    	_circularSaccade[20] = 1;
    	_circularSaccade[21] = 3;
    	_circularSaccade[22] = 5;
    	_circularSaccade[23] = 3;
    	_circularSaccade[24] = 9;
    	_circularSaccade[25] = 3;
    	break;
    
    //trajectory '3'
    //nb position: '3'
    //BNCOEPGPIOJMJKIJGJFJHJIJJIJGIEGDEDCEBF
    case '3':
    	_numSamplesCircularSaccade = 19;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 13;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 14;
    	_circularSaccade[4] = 4;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 6;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 8;
    	_circularSaccade[9] = 14;
    	_circularSaccade[10] = 9;
    	_circularSaccade[11] = 12;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 10;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 9;
    	_circularSaccade[16] = 6;
    	_circularSaccade[17] = 9;
    	_circularSaccade[18] = 5;
    	_circularSaccade[19] = 9;
    	_circularSaccade[20] = 7;
    	_circularSaccade[21] = 9;
    	_circularSaccade[22] = 8;
    	_circularSaccade[23] = 9;
    	_circularSaccade[24] = 9;
    	_circularSaccade[25] = 8;
    	_circularSaccade[26] = 9;
    	_circularSaccade[27] = 6;
    	_circularSaccade[28] = 8;
    	_circularSaccade[29] = 4;
    	_circularSaccade[30] = 6;
    	_circularSaccade[31] = 3;
    	_circularSaccade[32] = 4;
    	_circularSaccade[33] = 3;
    	_circularSaccade[34] = 2;
    	_circularSaccade[35] = 4;
    	_circularSaccade[36] = 1;
    	_circularSaccade[37] = 5;
    	break;
    
    //trajectory '4'
    //nb position: '('
    //HDHHHLHPELBHFHJH
    case '4':
    	_numSamplesCircularSaccade = 8;
    	_circularSaccade[0] = 7;
    	_circularSaccade[1] = 3;
    	_circularSaccade[2] = 7;
    	_circularSaccade[3] = 7;
    	_circularSaccade[4] = 7;
    	_circularSaccade[5] = 11;
    	_circularSaccade[6] = 7;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 4;
    	_circularSaccade[9] = 11;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 7;
    	_circularSaccade[12] = 5;
    	_circularSaccade[13] = 7;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 7;
    	break;
    
    //trajectory '5'
    //nb position: '/'
    //JPFPCPBLBJEKGKIJJHJGIEGDEDCEBF
    case '5':
    	_numSamplesCircularSaccade = 15;
    	_circularSaccade[0] = 9;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 5;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 2;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 11;
    	_circularSaccade[8] = 1;
    	_circularSaccade[9] = 9;
    	_circularSaccade[10] = 4;
    	_circularSaccade[11] = 10;
    	_circularSaccade[12] = 6;
    	_circularSaccade[13] = 10;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 9;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 7;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 6;
    	_circularSaccade[20] = 8;
    	_circularSaccade[21] = 4;
    	_circularSaccade[22] = 6;
    	_circularSaccade[23] = 3;
    	_circularSaccade[24] = 4;
    	_circularSaccade[25] = 3;
    	_circularSaccade[26] = 2;
    	_circularSaccade[27] = 4;
    	_circularSaccade[28] = 1;
    	_circularSaccade[29] = 5;
    	break;
    
    //trajectory '6'
    //nb position: '3'
    //JNIOGPEPCOBMBJBGCEEDGDIEJGJHIJGKEKCJBH
    case '6':
    	_numSamplesCircularSaccade = 19;
    	_circularSaccade[0] = 9;
    	_circularSaccade[1] = 13;
    	_circularSaccade[2] = 8;
    	_circularSaccade[3] = 14;
    	_circularSaccade[4] = 6;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 4;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 2;
    	_circularSaccade[9] = 14;
    	_circularSaccade[10] = 1;
    	_circularSaccade[11] = 12;
    	_circularSaccade[12] = 1;
    	_circularSaccade[13] = 9;
    	_circularSaccade[14] = 1;
    	_circularSaccade[15] = 6;
    	_circularSaccade[16] = 2;
    	_circularSaccade[17] = 4;
    	_circularSaccade[18] = 4;
    	_circularSaccade[19] = 3;
    	_circularSaccade[20] = 6;
    	_circularSaccade[21] = 3;
    	_circularSaccade[22] = 8;
    	_circularSaccade[23] = 4;
    	_circularSaccade[24] = 9;
    	_circularSaccade[25] = 6;
    	_circularSaccade[26] = 9;
    	_circularSaccade[27] = 7;
    	_circularSaccade[28] = 8;
    	_circularSaccade[29] = 9;
    	_circularSaccade[30] = 6;
    	_circularSaccade[31] = 10;
    	_circularSaccade[32] = 4;
    	_circularSaccade[33] = 10;
    	_circularSaccade[34] = 2;
    	_circularSaccade[35] = 9;
    	_circularSaccade[36] = 1;
    	_circularSaccade[37] = 7;
    	break;
    
    //trajectory '7'
    //nb position: '''
    //BOBPFPJPHLFHDD
    case '7':
    	_numSamplesCircularSaccade = 7;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 14;
    	_circularSaccade[2] = 1;
    	_circularSaccade[3] = 15;
    	_circularSaccade[4] = 5;
    	_circularSaccade[5] = 15;
    	_circularSaccade[6] = 9;
    	_circularSaccade[7] = 15;
    	_circularSaccade[8] = 7;
    	_circularSaccade[9] = 11;
    	_circularSaccade[10] = 5;
    	_circularSaccade[11] = 7;
    	_circularSaccade[12] = 3;
    	_circularSaccade[13] = 3;
    	break;
    
    //trajectory '8'
    //nb position: '4'
    //EJCKBMCOEPGPIOJMIKGJEJCIBGCEEDGDIEJGIIGJ
    case '8':
    	_numSamplesCircularSaccade = 20;
    	_circularSaccade[0] = 4;
    	_circularSaccade[1] = 9;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 10;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 12;
    	_circularSaccade[6] = 2;
    	_circularSaccade[7] = 14;
    	_circularSaccade[8] = 4;
    	_circularSaccade[9] = 15;
    	_circularSaccade[10] = 6;
    	_circularSaccade[11] = 15;
    	_circularSaccade[12] = 8;
    	_circularSaccade[13] = 14;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 12;
    	_circularSaccade[16] = 8;
    	_circularSaccade[17] = 10;
    	_circularSaccade[18] = 6;
    	_circularSaccade[19] = 9;
    	_circularSaccade[20] = 4;
    	_circularSaccade[21] = 9;
    	_circularSaccade[22] = 2;
    	_circularSaccade[23] = 8;
    	_circularSaccade[24] = 1;
    	_circularSaccade[25] = 6;
    	_circularSaccade[26] = 2;
    	_circularSaccade[27] = 4;
    	_circularSaccade[28] = 4;
    	_circularSaccade[29] = 3;
    	_circularSaccade[30] = 6;
    	_circularSaccade[31] = 3;
    	_circularSaccade[32] = 8;
    	_circularSaccade[33] = 4;
    	_circularSaccade[34] = 9;
    	_circularSaccade[35] = 6;
    	_circularSaccade[36] = 8;
    	_circularSaccade[37] = 8;
    	_circularSaccade[38] = 6;
    	_circularSaccade[39] = 9;
    	break;
    
    //trajectory '9'
    //nb position: '4'
    //BGCEEDGDIEJGJIJKJMIOGPEPCOBMBLCJEIGIIJJL
    case '9':
    	_numSamplesCircularSaccade = 20;
    	_circularSaccade[0] = 1;
    	_circularSaccade[1] = 6;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 4;
    	_circularSaccade[4] = 4;
    	_circularSaccade[5] = 3;
    	_circularSaccade[6] = 6;
    	_circularSaccade[7] = 3;
    	_circularSaccade[8] = 8;
    	_circularSaccade[9] = 4;
    	_circularSaccade[10] = 9;
    	_circularSaccade[11] = 6;
    	_circularSaccade[12] = 9;
    	_circularSaccade[13] = 8;
    	_circularSaccade[14] = 9;
    	_circularSaccade[15] = 10;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 12;
    	_circularSaccade[18] = 8;
    	_circularSaccade[19] = 14;
    	_circularSaccade[20] = 6;
    	_circularSaccade[21] = 15;
    	_circularSaccade[22] = 4;
    	_circularSaccade[23] = 15;
    	_circularSaccade[24] = 2;
    	_circularSaccade[25] = 14;
    	_circularSaccade[26] = 1;
    	_circularSaccade[27] = 12;
    	_circularSaccade[28] = 1;
    	_circularSaccade[29] = 11;
    	_circularSaccade[30] = 2;
    	_circularSaccade[31] = 9;
    	_circularSaccade[32] = 4;
    	_circularSaccade[33] = 8;
    	_circularSaccade[34] = 6;
    	_circularSaccade[35] = 8;
    	_circularSaccade[36] = 8;
    	_circularSaccade[37] = 9;
    	_circularSaccade[38] = 9;
    	_circularSaccade[39] = 11;
    	break;
    
    //trajectory '0'
    //nb position: '-'
    //EPCNBKBICFEDGDIFJIJKINGPEP
    case '0':
    	_numSamplesCircularSaccade = 13;
    	_circularSaccade[0] = 4;
    	_circularSaccade[1] = 15;
    	_circularSaccade[2] = 2;
    	_circularSaccade[3] = 13;
    	_circularSaccade[4] = 1;
    	_circularSaccade[5] = 10;
    	_circularSaccade[6] = 1;
    	_circularSaccade[7] = 8;
    	_circularSaccade[8] = 2;
    	_circularSaccade[9] = 5;
    	_circularSaccade[10] = 4;
    	_circularSaccade[11] = 3;
    	_circularSaccade[12] = 6;
    	_circularSaccade[13] = 3;
    	_circularSaccade[14] = 8;
    	_circularSaccade[15] = 5;
    	_circularSaccade[16] = 9;
    	_circularSaccade[17] = 8;
    	_circularSaccade[18] = 9;
    	_circularSaccade[19] = 10;
    	_circularSaccade[20] = 8;
    	_circularSaccade[21] = 13;
    	_circularSaccade[22] = 6;
    	_circularSaccade[23] = 15;
    	_circularSaccade[24] = 4;
    	_circularSaccade[25] = 15;
    	break;
  
  //trajectory 'a'
//nb position: '6'
//FMFMGMHNHOGPFPEOENFMFKHLFKDJFKFIIHGFIHFIGGED
case 'a':
       _numSamplesCircularSaccade = 22;
       _circularSaccade[0] = 5;
       _circularSaccade[1] = 12;
       _circularSaccade[2] = 5;
       _circularSaccade[3] = 12;
       _circularSaccade[4] = 6;
       _circularSaccade[5] = 12;
       _circularSaccade[6] = 7;
       _circularSaccade[7] = 13;
       _circularSaccade[8] = 7;
       _circularSaccade[9] = 14;
       _circularSaccade[10] = 6;
       _circularSaccade[11] = 15;
       _circularSaccade[12] = 5;
       _circularSaccade[13] = 15;
       _circularSaccade[14] = 4;
       _circularSaccade[15] = 14;
       _circularSaccade[16] = 4;
       _circularSaccade[17] = 13;
       _circularSaccade[18] = 5;
       _circularSaccade[19] = 12;
       _circularSaccade[20] = 5;
       _circularSaccade[21] = 10;
       _circularSaccade[22] = 7;
       _circularSaccade[23] = 11;
       _circularSaccade[24] = 5;
       _circularSaccade[25] = 10;
       _circularSaccade[26] = 3;
       _circularSaccade[27] = 9;
       _circularSaccade[28] = 5;
       _circularSaccade[29] = 10;
       _circularSaccade[30] = 5;
       _circularSaccade[31] = 8;
       _circularSaccade[32] = 8;
       _circularSaccade[33] = 7;
       _circularSaccade[34] = 6;
       _circularSaccade[35] = 5;
       _circularSaccade[36] = 8;
       _circularSaccade[37] = 7;
       _circularSaccade[38] = 5;
       _circularSaccade[39] = 8;
       _circularSaccade[40] = 6;
       _circularSaccade[41] = 6;
       _circularSaccade[42] = 4;
       _circularSaccade[43] = 3;
       break;

//trajectory 'b'
//nb position: '6'
//FMFMGMHNHOGPFPEOENFMFKHKFKDKFKFHHIFFHIFHHFFD
case 'b':
       _numSamplesCircularSaccade = 22;
       _circularSaccade[0] = 5;
       _circularSaccade[1] = 12;
       _circularSaccade[2] = 5;
       _circularSaccade[3] = 12;
       _circularSaccade[4] = 6;
       _circularSaccade[5] = 12;
       _circularSaccade[6] = 7;
       _circularSaccade[7] = 13;
       _circularSaccade[8] = 7;
       _circularSaccade[9] = 14;
       _circularSaccade[10] = 6;
       _circularSaccade[11] = 15;
       _circularSaccade[12] = 5;
       _circularSaccade[13] = 15;
       _circularSaccade[14] = 4;
       _circularSaccade[15] = 14;
       _circularSaccade[16] = 4;
       _circularSaccade[17] = 13;
       _circularSaccade[18] = 5;
       _circularSaccade[19] = 12;
       _circularSaccade[20] = 5;
       _circularSaccade[21] = 10;
       _circularSaccade[22] = 7;
       _circularSaccade[23] = 10;
       _circularSaccade[24] = 5;
       _circularSaccade[25] = 10;
       _circularSaccade[26] = 3;
       _circularSaccade[27] = 10;
       _circularSaccade[28] = 5;
       _circularSaccade[29] = 10;
       _circularSaccade[30] = 5;
       _circularSaccade[31] = 7;
       _circularSaccade[32] = 7;
       _circularSaccade[33] = 8;
       _circularSaccade[34] = 5;
       _circularSaccade[35] = 5;
       _circularSaccade[36] = 7;
       _circularSaccade[37] = 8;
       _circularSaccade[38] = 5;
       _circularSaccade[39] = 7;
       _circularSaccade[40] = 7;
       _circularSaccade[41] = 5;
       _circularSaccade[42] = 5;
       _circularSaccade[43] = 3;
       break;
//trajectory 'c'
//nb position: '6'
//FMFMGMHNHOGPFPEOENFMFKHJFKDLFKFIIHGEIHFIGHEE
case 'c':
       _numSamplesCircularSaccade = 22;
       _circularSaccade[0] = 5;
       _circularSaccade[1] = 12;
       _circularSaccade[2] = 5;
       _circularSaccade[3] = 12;
       _circularSaccade[4] = 6;
       _circularSaccade[5] = 12;
       _circularSaccade[6] = 7;
       _circularSaccade[7] = 13;
       _circularSaccade[8] = 7;
       _circularSaccade[9] = 14;
       _circularSaccade[10] = 6;
       _circularSaccade[11] = 15;
       _circularSaccade[12] = 5;
       _circularSaccade[13] = 15;
       _circularSaccade[14] = 4;
       _circularSaccade[15] = 14;
       _circularSaccade[16] = 4;
       _circularSaccade[17] = 13;
       _circularSaccade[18] = 5;
       _circularSaccade[19] = 12;
       _circularSaccade[20] = 5;
       _circularSaccade[21] = 10;
       _circularSaccade[22] = 7;
       _circularSaccade[23] = 9;
       _circularSaccade[24] = 5;
       _circularSaccade[25] = 10;
       _circularSaccade[26] = 3;
       _circularSaccade[27] = 11;
       _circularSaccade[28] = 5;
       _circularSaccade[29] = 10;
       _circularSaccade[30] = 5;
       _circularSaccade[31] = 8;
       _circularSaccade[32] = 8;
       _circularSaccade[33] = 7;
       _circularSaccade[34] = 6;
       _circularSaccade[35] = 4;
       _circularSaccade[36] = 8;
       _circularSaccade[37] = 7;
       _circularSaccade[38] = 5;
       _circularSaccade[39] = 8;
       _circularSaccade[40] = 6;
       _circularSaccade[41] = 7;
       _circularSaccade[42] = 4;
       _circularSaccade[43] = 4;
       break;
  }
  
  for (int i=0; i<_numSamplesCircularSaccade; i++) {
    	_circularSaccade[2*i]=byte(1.0*(_circularSaccade[2*i]-5)/10*255+127);
        _circularSaccade[2*i+1]=byte(1.0*(-_circularSaccade[2*i+1]+9)/13*255+127);
        // old code with float for saccade positions:
        // _circularSaccade[2*i]-=5;
       // _circularSaccade[2*i+1]-=9; _circularSaccade[2*i+1]*=-1;
  }
  
  return returnedValue;
}
